#define _CRT_SECURE_NO_WARNINGS 1
//#include <stdio.h>
//int main() {
//    int seconds, b, c;
//    scanf("%d", &seconds);
//    b = seconds / 60 % 60;
//    c = seconds / 3600;
//    printf("%d %d %d", c, b, seconds % 60);
//    return 0;
//}


//#include <stdio.h>
//int main() {
//    int n;
//    scanf("%d", &n);
//    printf("%d", 2 << (n - 1));
//    return 0;
//}


//#include <stdio.h>
//int main() {
//    long long age;
//    scanf("%lld", &age);
//    age *= 3.156 * 10000000;
//    printf("%lld", age);
//    return 0;
//}

#include <stdio.h>
int main() {
    float n, grades, top_score=0.0f, lowest_score = 100.0f, average_score = 0.0f, sum = 0.0f, a = 0.0f;
    scanf("%f", &n);
    while (a < n)
    {
        scanf("%f", &grades);
        if (grades < lowest_score)
            lowest_score = grades;
        else if (grades > top_score)
            top_score = grades;
        sum += grades;
        a++;
    }
    average_score = sum / n;
    printf("%.2f %.2f %.2f", top_score, lowest_score, average_score);
    return 0;
}